|
|
|
|
|
|
|
On Error Resume Next
ws.BeginTrans
db.Execute strSQLDelete
db.Execute strSQLTemp
db.Execute strSQLUpdate
db.Execute strSQLInsert
db.Execute strSQLDrop
'
If Err.Number = 0 Then
ws.CommitTrans
Else
ws.Rollback
MsgBox "Unable to complete transaction", vbExclamation, "Copy All"
End If
'
db.Close
ws.Close
Set db = Nothing
Set ws = Nothing
'
accLoadLists
End If
'
End Sub |
|
|
|
|
|
|
|
|
The last routine you need to add is the one for the Set Level button. This routine calls another small form that you build next. The second form is where you set the access level for the selected rights object. Create a new subroutine called accSetLevel and add the code in Listing 21.28. |
|
|
|
|
|
|
|
|
Listing 21.28. The accSetLevel routine. |
|
|
|
|
|
|
|
|
Public Sub accSetLevel()
'
' set user access level
'
Dim strRightsName As String
'
strRightsName = lblUserID & " ["
strRightsName = strRightsName & dtaUserID.Recordset.Fields("Object") & "]"
intRights = dtaUserID.Recordset![Level]
'
frmRights.fraRights = strRightsName
frmRights.Caption = "User Access Rights"
'
frmRights.Show vbModal
'
' update object rights
With dtaUserID.Recordset
.Edit
.Fields("[Level]") = intRights
.Update |
|
|
|
|
|